package cn.kgc.jjl.send;

import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.net.Socket;
import java.net.UnknownHostException;

public class Demo03 {
	public static void main(String[] args) throws IOException, Throwable {
		Socket s = new Socket("192.168.1.173",10105);
		BufferedReader br = new BufferedReader(new FileReader("d:a.txt"));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(s.getOutputStream()));
		String  str;
		while ((str=br.readLine())!=null) {
			bw.write(str);
			bw.newLine();
			bw.flush();
			
		}
		br.close();
		s.close();
		
		
	}

}
